Skip to content

diagnostics_channel: add diagnostics channels for web locks#62123

Merged
nodejs-github-bot merged 2 commits intonodejs:mainfrom
IlyasShabi:ishabi/web-lock-dc
Mar 14, 2026
Merged

diagnostics_channel: add diagnostics channels for web locks#62123
nodejs-github-bot merged 2 commits intonodejs:mainfrom
IlyasShabi:ishabi/web-lock-dc

Conversation

@IlyasShabi
Copy link
Member

This PR adds diagnostics channels support for locks.request() giving visibility into the lock request lifecycle.

Four channels are emitted:

  • locks.request.start when a request begins
  • locks.request.grant when the lock is granted
  • locks.request.miss when the lock is not immediately available
  • locks.request.end when the request finishes

@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Mar 5, 2026
@IlyasShabi IlyasShabi marked this pull request as draft March 5, 2026 22:17
@IlyasShabi IlyasShabi force-pushed the ishabi/web-lock-dc branch from c92cc75 to 8ce0c9b Compare March 5, 2026 22:26
@IlyasShabi IlyasShabi marked this pull request as ready for review March 5, 2026 22:28
@IlyasShabi IlyasShabi changed the title locks: add diagnostics channels for web locks diagnostics_channel: add diagnostics channels for web locks Mar 5, 2026
@codecov
Copy link

codecov bot commented Mar 6, 2026

Codecov Report

❌ Patch coverage is 89.47368% with 6 lines in your changes missing coverage. Please review.
βœ… Project coverage is 89.65%. Comparing base (da5efc4) to head (ca7fc4d).
⚠️ Report is 141 commits behind head on main.

Files with missing lines Patch % Lines
lib/internal/locks.js 89.47% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #62123      +/-   ##
==========================================
+ Coverage   88.84%   89.65%   +0.81%     
==========================================
  Files         674      676       +2     
  Lines      204957   206604    +1647     
  Branches    39309    39554     +245     
==========================================
+ Hits       182087   185232    +3145     
+ Misses      15088    13502    -1586     
- Partials     7782     7870      +88     
Files with missing lines Coverage Ξ”
lib/internal/locks.js 94.39% <89.47%> (-0.70%) ⬇️

... and 250 files with indirect coverage changes

πŸš€ New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • πŸ“¦ JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@IlyasShabi IlyasShabi requested review from BridgeAR and Qard March 6, 2026 13:01
@legendecas legendecas added the diagnostics_channel Issues and PRs related to diagnostics channel label Mar 6, 2026
@IlyasShabi IlyasShabi requested a review from legendecas March 10, 2026 14:12
Copy link
Member

@legendecas legendecas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I forgot to hit the submit button. LGTM with a minor suggestion.

@IlyasShabi IlyasShabi requested a review from legendecas March 10, 2026 14:27
@IlyasShabi IlyasShabi added the request-ci Add this label to start a Jenkins CI on a PR. label Mar 10, 2026
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Mar 10, 2026
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@IlyasShabi IlyasShabi added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue Add this label to land a pull request using GitHub Actions. labels Mar 11, 2026
@nodejs-github-bot nodejs-github-bot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Mar 14, 2026
@nodejs-github-bot
Copy link
Collaborator

Commit Queue failed
- Loading data for nodejs/node/pull/62123
βœ”  Done loading data for nodejs/node/pull/62123
----------------------------------- PR info ------------------------------------
Title      diagnostics_channel: add diagnostics channels for web locks (#62123)
Author     Ilyas Shabi <ilyasshabi94@gmail.com> (@IlyasShabi)
Branch     IlyasShabi:ishabi/web-lock-dc -> nodejs:main
Labels     author ready, needs-ci, diagnostics_channel
Commits    2
 - diagnostics_channel: add diagnostics channels for web locks
 - update dc locks documentation
Committers 1
 - ishabi <ilyasshabi94@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/62123
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/62123
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
--------------------------------------------------------------------------------
   β„Ή  This PR was created on Thu, 05 Mar 2026 22:09:57 GMT
   βœ”  Approvals: 2
   βœ”  - Stephen Belanger (@Qard): https://github.com/nodejs/node/pull/62123#pullrequestreview-3905275680
   βœ”  - Chengzhong Wu (@legendecas) (TSC): https://github.com/nodejs/node/pull/62123#pullrequestreview-3922878021
   βœ”  Last GitHub CI successful
   β„Ή  Last Full PR CI on 2026-03-10T21:16:18Z: https://ci.nodejs.org/job/node-test-pull-request/71680/
- Querying data for job/node-test-pull-request/71680/
βœ”  Build data downloaded
   βœ”  Last Jenkins CI successful
--------------------------------------------------------------------------------
   βœ”  No git cherry-pick in progress
   βœ”  No git am in progress
   βœ”  No git rebase in progress
--------------------------------------------------------------------------------
- Bringing origin/main up to date...
From https://github.com/nodejs/node
 * branch                  main       -> FETCH_HEAD
βœ”  origin/main is now up-to-date
- Downloading patch for 62123
From https://github.com/nodejs/node
 * branch                  refs/pull/62123/merge -> FETCH_HEAD
βœ”  Fetched commits as a936d8968f9d..ca7fc4d07a6b
--------------------------------------------------------------------------------
Auto-merging doc/api/diagnostics_channel.md
[main 3a1f9731bf] diagnostics_channel: add diagnostics channels for web locks
 Author: ishabi <ilyasshabi94@gmail.com>
 Date: Thu Mar 5 22:42:29 2026 +0100
 3 files changed, 270 insertions(+), 3 deletions(-)
 create mode 100644 test/parallel/test-diagnostics-channel-web-locks.js
Auto-merging doc/api/diagnostics_channel.md
[main e77c6fca33] update dc locks documentation
 Author: ishabi <ilyasshabi94@gmail.com>
 Date: Tue Mar 10 15:26:32 2026 +0100
 1 file changed, 2 insertions(+), 2 deletions(-)
   βœ”  Patches applied
There are 2 commits in the PR. Attempting autorebase.
(node:462) [DEP0190] DeprecationWarning: Passing args to a child process with shell option true can lead to security vulnerabilities, as the arguments are not escaped, only concatenated.
(Use `node --trace-deprecation ...` to show where the warning was created)
Rebasing (2/4)
Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
diagnostics_channel: add diagnostics channels for web locks

PR-URL: #62123
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>

[detached HEAD 7d9c6247cf] diagnostics_channel: add diagnostics channels for web locks
Author: ishabi <ilyasshabi94@gmail.com>
Date: Thu Mar 5 22:42:29 2026 +0100
3 files changed, 270 insertions(+), 3 deletions(-)
create mode 100644 test/parallel/test-diagnostics-channel-web-locks.js
Rebasing (3/4)
Rebasing (4/4)
Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
update dc locks documentation

PR-URL: #62123
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>

[detached HEAD fae8610383] update dc locks documentation
Author: ishabi <ilyasshabi94@gmail.com>
Date: Tue Mar 10 15:26:32 2026 +0100
1 file changed, 2 insertions(+), 2 deletions(-)
Successfully rebased and updated refs/heads/main.

β„Ή Add commit-queue-squash label to land the PR as one commit, or commit-queue-rebase to land as separate commits.

https://github.com/nodejs/node/actions/runs/23097632174

@IlyasShabi IlyasShabi added commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. and removed commit-queue-failed An error occurred while landing this pull request using GitHub Actions. labels Mar 14, 2026
@IlyasShabi IlyasShabi added the commit-queue Add this label to land a pull request using GitHub Actions. label Mar 14, 2026
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Mar 14, 2026
@nodejs-github-bot nodejs-github-bot merged commit 1989f4d into nodejs:main Mar 14, 2026
82 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 1989f4d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. diagnostics_channel Issues and PRs related to diagnostics channel needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants